import http from "../plugins/request";

export default {

    //分页查询角色列表
     async getRolePage(param) {
        return  await http.get("/getRolePage", param);
    },
    //部门列表
     async getDeptList(param) {
        return  await http.get("/getDeptList", param);
    },

    //添加角色
    async addRole(param) {
        return await http.post("/addRole", param);
    },

    //修改角色
    async updateRole(param) {
        return await http.put("/updateRole", param);
    },
    //分配权限
    async saveRoleMenu(param) {
        return await http.post("/saveRoleMenu", param);
    },

    //删除角色
    async deleteRole(param) {
        return await http.delete("/deleteRole", param);
    },

    //获取分配角色列表数据
    async getMenuByRole(params) {
        return await http.get("/getMenuByRole", params);
    },

    //用户分配角色
    async assignRoleSave(params) {
        return await http.post("/system/user/saveUserRole", params)
    },

    // 导出用户信息
    async exportSysUser(params) {
        return await http.post("/system/user/export", params)
    },

    // 上传图片
    async upload(params) {
        return await http.upload("/uploadAvatar", params)
    },


}
